﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="ChangePassword.aspx.cs" Inherits="ESAM_Assignment_3.ChangePassword" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">

        .style7
        {
            width: 200px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="pnlContent" runat="server" BackColor="#00CC99" BorderColor="Silver"
        BorderStyle="Solid" BorderWidth="1px">
        <strong>Change Password
        </strong><br />
        <br />
        <table ID="tblComments" width="1000">
            <tr>
                <td class="style7">
                    Username:</td>
                <td>
                    <asp:Label ID="lblUsername" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    Current Password:</td>
                <td>
                    <asp:TextBox ID="tbxCurrentPassword" runat="server" Columns="40" 
                        MaxLength="100" TextMode="Password"></asp:TextBox>
                    &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="tbxCurrentPassword" ErrorMessage="Required Field" 
                        ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    New Password:
                </td>
                <td>
                    <asp:TextBox ID="tbxNewPassword" runat="server" MaxLength="100" Columns="40" 
                        TextMode="Password"></asp:TextBox>
                    &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="tbxNewPassword" Display="Dynamic" ErrorMessage="Required Field" 
                        ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="tbxNewPassword" 
                        ErrorMessage=" Password must be at least 6 characters, no more than 16 characters, and must include at least one upper case letter, one lower case letter, and one numeric digit." 
                        ForeColor="Red" 
                        ValidationExpression="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,16}$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    Retype New Password:</td>
                <td>
                    <asp:TextBox ID="tbxRetypePassword" runat="server" Columns="40" MaxLength="100" 
                        TextMode="Password"></asp:TextBox>
                    &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ControlToValidate="tbxRetypePassword" Display="Dynamic" 
                        ErrorMessage="Required Field" ForeColor="Red"></asp:RequiredFieldValidator>
                    &nbsp;<asp:CompareValidator ID="CompareValidator1" runat="server" 
                        ControlToCompare="tbxNewPassword" ControlToValidate="tbxRetypePassword" 
                        Display="Dynamic" ErrorMessage="You didn't retype your new password correctly" 
                        ForeColor="Red"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="btnChangePassword" runat="server" Height="26px" 
                        Text="Change Password" Width="153px" onclick="btnChangePassword_Click" />
                    &nbsp;<asp:Label ID="lblStatus" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
        <br />
    </asp:Panel>
</asp:Content>
